package com.example.base.checker;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.FIELD})
@Retention(value = RetentionPolicy.RUNTIME)
@Constraint(validatedBy = UniqueCheckImpl.class)
public @interface UniqueCheck {

    String message() default "邮箱已经被使用";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
